package com.mayuanfei.springboot11.pojo;

import com.mayuanfei.springboot11.common.CommonRequest;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 用户请求对象
 *
 * @author 老马
 * @date 2023-06-16 13:27
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class UserSignBO extends CommonRequest {
    @NotBlank(message = "userid不能为空")
    @Length(min = 6,max = 12,message = "userid长度必须位于6到12之间")
    private String userid;

    @NotNull(message = "age不能为空")
    @Range(min = 1, max = 100, message = "年龄填写范围[1-100]")
    private Integer age;

    @NotBlank(message = "name不能为空")
    private String name;
}